home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr10 / gsar106.zip / GSAR.H < prev    next >
C/C++ Source or Header  |  1993-06-01  |  2KB  |  64 lines

  1. /* gsar.h ***************************************** UPDATED: 930325.19:31 TT
  2.  *
  3.  * Description : Header file for gsar
  4.  * Author      : Tormod Tjaberg
  5.  *
  6.  * Changes:
  7.  *
  8.  * Currently compiles under :
  9.  * Turbo C 2.0, Turbo C++ 1.0, Turbo C++ 3.0, Zortech C++ 3.0,
  10.  * Watcom C 386 8.0, Ultrix ANSI C, Microsoft 6.0, GCC
  11.  */
  12.  
  13.  
  14. /* System type defined upon the following
  15.  * __TURBOC__ : All Borland C/C++ versions
  16.  * __ZTC__    : Zortech
  17.  * MSDOS      : Set by various DOS compilers... ( Watcom 386, Microsoft )
  18.  */
  19.  
  20. #if defined(__TURBOC__) || defined(__ZTC__) || defined(MSDOS)
  21. #ifndef MSDOS
  22. #define MSDOS     5
  23. #endif
  24. #else
  25. #ifndef __UNIX__
  26. #define __UNIX__  3
  27. #endif
  28. #endif
  29.  
  30. #ifndef BUFSIZ                            /* ANSI C predefined constant */
  31. #ifdef MSDOS
  32. #define BUFSIZ 1024                       /* size of search buffer */
  33. #else             /* its __UNIX__ */
  34. #define BUFSIZ 4048                       /* size of search buffer */
  35. #endif
  36. #endif
  37.  
  38. #define TXT_CONTEXT 80      /* length of textual context     */
  39. #define HEX_CONTEXT 64      /* amount of hex bytes displayed */
  40. #define PAT_BUFSIZ  128     /* buffer limit < unsigned short */
  41.  
  42. typedef struct
  43. {
  44.    char fVerbose;           /* true if we are to be verbose */
  45.    char fByteOffset;        /* display byte offset in file */
  46.    char fTextual;           /* display context textual */
  47.    char fFileSpec;          /* display filespec */
  48.    char fHex;               /* display contents in hex */
  49.    char *pInputFile;        /* current input file name */
  50.    FILE *fpIn;              /* input stream */
  51.    FILE *fpOut;             /* output stream */
  52.    FILE *fpMsg;             /* message stream */
  53.    unsigned short Context;  /* length of context to display */
  54. } OUTPUT_CTRL;
  55.  
  56.  
  57. /* function prototypes
  58.  */
  59. void BMGSetup( char *, int, char);
  60. long BMGSearch( OUTPUT_CTRL * );
  61. long BMGSearchReplace( OUTPUT_CTRL *, char *, unsigned short );
  62. void Abort( char *, ... );
  63.  
  64.